package jwdt.xadmin.work.bean;


import jwdt.xadmin.system.bean.TUser;

import com.ezerg.db.Jdb;
import com.ezerg.db.annotation.Column;
import com.ezerg.db.annotation.Table;

@Table(name="t_task", keys={"taskid"}, comment="任务管理")
public class TTask implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	@Column(value="taskid", comment="ID")
	private Integer taskid;
	
	@Column(value="depid", comment="部门id")
	private Integer depid;
	
	@Column(value="projectid", comment="项目ID")
	private Integer projectid;
	
	@Column(value="name", comment="名称")
	private String name;
	
	@Column(value="starttime", comment="开始时间")
	private String starttime;
	
	@Column(value="stoptime", comment="结束时间")
	private String stoptime;
	
	@Column(value="creator", comment="创建人")
	private Integer creator;
	
	@Column(value="dt", comment="创建时间")
	private String dt;
	
	@Column(value="worker", comment="主执行人")
	private Integer worker;
	
	@Column(value="visitor", comment="参与执行人")
	private String visitor;
	
	@Column(value="zt", comment="状态")
	private Integer zt;
	
	@Column(value="demo", comment="说明")
	private String demo;

	public Integer getTaskid() {
		return taskid;
	}

	public void setTaskid(Integer taskid) {
		this.taskid = taskid;
	}
	
	public Integer getDepid() {
		return depid;
	}

	public void setDepid(Integer depid) {
		this.depid = depid;
	}

	public Integer getProjectid() {
		return projectid;
	}

	public void setProjectid(Integer projectid) {
		this.projectid = projectid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getStarttime() {
		return starttime;
	}

	public void setStarttime(String starttime) {
		this.starttime = starttime;
	}

	public String getStoptime() {
		return stoptime;
	}

	public void setStoptime(String stoptime) {
		this.stoptime = stoptime;
	}

	public Integer getCreator() {
		return creator;
	}

	public void setCreator(Integer creator) {
		this.creator = creator;
	}

	public String getDt() {
		return dt;
	}

	public void setDt(String dt) {
		this.dt = dt;
	}

	public Integer getWorker() {
		return worker;
	}

	public void setWorker(Integer worker) {
		this.worker = worker;
	}

	public String getVisitor() {
		return visitor;
	}

	public void setVisitor(String visitor) {
		this.visitor = visitor;
	}

	public Integer getZt() {
		return zt;
	}

	public void setZt(Integer zt) {
		this.zt = zt;
	}

	public String getDemo() {
		return demo;
	}

	public void setDemo(String demo) {
		this.demo = demo;
	}

	public String getProjectname() {
		TProject proj = (TProject) Jdb.get().get(TProject.class, this.projectid);
		return proj != null? proj.getName(): "";
	}
	
	public String getCreatorname() {
		TUser user = (TUser) Jdb.get().get(TUser.class, this.creator);
		return user != null? user.getUsername(): "";
	}
	
	public String getWorkername() {
		TUser user = (TUser) Jdb.get().get(TUser.class, this.worker);
		return user != null ? user.getUsername(): "";
	}
}
